<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path_part = request.getContextPath();
	String basePathter = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path_part + "/";
%>
<div class="wbs_scroll" style="height:23px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview">
	<thead>
	  <tr class="title">
           <td style="width: 10%;">序号</td>
           <td style="width: 20%;">名称</td>
           <td style="width: 20%;">分值</td>
           <td style="width: 20%;">备注</td>
           <td style="width: 10%;">操作</td>
       </tr>
	</thead>
</table>
</div>
<div class="wbs_scroll" style="height:396px;" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview" id="sale_saleChance_table">
	<tbody class="mytbody">
		<s:if test="listExamineProjectStandardVo.size()==0">
       		<tr>
       			<td colspan="2" align="center">无记录</td>
       		</tr>
       	</s:if>
       	<s:else>
	         <s:iterator value="listExamineProjectStandardVo" status="stat">
		          <tr>
		              <td style="width: 10%;"><s:property value="#stat.count"/></td>
		              <td style="width: 20%;"><s:property value="name"/></td>
		              <td style="width: 20%;"><s:property value="score" /></td>
		              <td style="width: 20%;"><s:property value="memo"/></td>
		              <td style="width: 10%;">
						<a href="javascript:void(0)" onclick="showDialog('鼎烜电力集团网络办公平台','getExamineProjectStandardById?examineProjectStandardVo.id=<s:property value="id"/>','500','350');">修改</a> 
						<a href="javascript:void(0)" onclick="removeTr('<s:property value="id"/>');">删除</a> 			                    
		              </td>
		          </tr>
	         </s:iterator>
       	</s:else>
	</tbody>
</table>
<%@include file="../../../common/jsp/pageing.jsp" %>
</div>
<script>
	function removeTr(id){
		if(window.confirm("您确定要删除此考核项目吗？")){
			var _url = 'deleteExamineProjectStandardById?examineProjectStandardVo.id='+id;
			$.ajax( {
				url : _url,
				type : 'POST',
				success : function(result){
					// 通过javascript对象把返回的结果转为javascript对象
					var jsonMsgObj=new JsonMsgObj(result);
					// 通过getMessage()得到返回的异常信息,此异常信息为json格式
					var  msg=jsonMsgObj.getMessage();
					// 如果为-1就是验证异常
					var codeId=jsonMsgObj.getCodeid();
					var isOk=jsonMsgObj.getIsok();
					// 判断是否插入成功了
					if( isOk ){
						// 执行添加操作成功了，在页面要完成的操作
						// 在此时要完成的操作就是在父页面的科目列表中添加一行新插入的信息
						aerouiAlert(msg);
						hideDialog();
						window.location.reload();
					// 如果插入没有成功时
					}else{
						// 如果没有成功，就处理异常
						jsHandleException( codeId , msg );
					}
				}
			} );
		}
	}
</script>